<?php
$codeList = $this->codeList;
$newCode = $this->newCode;
?>
<h1>Code Activités</h1>
<div id="tabs">
    <ul>
        <li><a href="#list">Liste</a></li>
        <li><a href="#create">Création de Code Activité</a></li>
    </ul>
    <div id="list">
        <table>
            <thead>
                <tr>
                    <td>Code</td>
                    <td>Libellé</td>
                    <td>Payé</td>
                    <td>Coefficient</td>
                    <td>Couleur</td>
                    <td>Description</td>
                </tr>
            </thead>
            <tbody>
                <?php foreach($codeList as $code): ?>
                <tr>
                    <td><?php echo $code->code; ?></td>
                    <td><?php echo $code->libelle; ?></td>
                    <td><?php echo $code->paye; ?></td>
                    <td><?php echo $code->coefficient; ?></td>
                    <td><?php echo $code->color_name; ?></td>
                    <td><?php echo $code->description; ?></td>
                </tr>
                <?php endforeach; ?>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="10">&nbsp;</td>
                </tr>
            </tfoot>
        </table>
    </div>
    <div id="create">
        <?php
        $newCode->setAttribute('action', '#');
        $newCode->prepare();
        echo $this->form()->openTag($newCode);
        echo $this->formCollection($newCode);
        echo $this->form()->closeTag();
        ?>
    </div>
</div>